package com.sikaryofficial.file.controller.mapping;

import com.sikaryofficial.system.api.domain.SysFile;
import com.sikaryofficial.system.api.model.FileMd5VO;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.factory.Mappers;

/**
 * @author : qinjinyuan
 * @desc : FileMD5映射接口
 * @date : 2023/11/03 9:19
 */
@Mapper
public interface FileMD5Mapping {
    FileMD5Mapping INSTANCE = Mappers.getMapper(FileMD5Mapping.class);
    /**
     * 实体映射resp
     *
     * @param fileMd5
     * @return
     */
    @Mapping(source = "name", target = "fileName")
    @Mapping(source = "videoCoverUrl", target = "coverUrl")
    FileMd5VO coverToVO(SysFile fileMd5);
}
